package com.cellngine.client;

import java.nio.ByteBuffer;
import static org.lwjgl.opengl.GL11.*;

public class Texture
{
	private String		textureName;
	private int			textureWidth;
	private int			textureHeight;
	private int			textureFormat;
	private ByteBuffer	textureData;
	private String		texturePath;
	private int			textureGL;
	
	public Texture(final String name, final String path, final int width, final int height,
			final int format, final ByteBuffer data, final int GLIndex)
	{
		textureName = name;
		texturePath = path;
		textureWidth = width;
		textureHeight = height;
		textureFormat = format;
		textureData = data;
		textureGL = GLIndex;
	}
	
	public String getTextureName()
	{
		return textureName;
	}
	
	public String getTexturePath()
	{
		return texturePath;
	}
	
	public int[] getTextureDimensions()
	{
		return new int[] { textureWidth, textureHeight };
	}
	
	public int getTextureFormat()
	{
		return textureFormat;
	}
	
	public int getTextureOpenGLIndex()
	{
		return textureGL;
	}
	
	public ByteBuffer getTextureData()
	{
		return textureData;
	}
	
	public void bind()
	{
		glBindTexture(GL_TEXTURE_2D, textureGL);
	}
}
